curl -L -O https://gitee.com/Ther-CN/TAI/raw/master/README.md
clear && echo 正在检查网络
if [ ! -f "README.md" ]; then
    echo "\033[1;31;40;1mERROR:\033[0m"无法连接到服务器
 else
  echo 网络正常，请不要关闭此应用
echo 正在安装需要的软件包，中途需要点按几次回车
sed -i 's@^\(deb.*stable main\)$@#\1\ndeb https://mirrors.tuna.tsinghua.edu.cn/termux/termux-packages-24 stable main@' $PREFIX/etc/apt/sources.list && sed -i 's@^\(deb.*games stable\)$@#\1\ndeb https://mirrors.tuna.tsinghua.edu.cn/termux/game-packages-24 games stable@' $PREFIX/etc/apt/sources.list.d/game.list && sed -i 's@^\(deb.*science stable\)$@#\1\ndeb https://mirrors.tuna.tsinghua.edu.cn/termux/science-packages-24 science stable@' $PREFIX/etc/apt/sources.list.d/science.list && apt update && apt upgrade && pkg install proot bsdtar wget -y
cd
rm -rf README.md arch setupTermuxArch.sh
mkdir arch 
cd arch
wget https://mirrors.ustc.edu.cn/archlinuxarm/os/ArchLinuxARM-aarch64-latest.tar.gz.md5 https://mirrors.ustc.edu.cn/archlinuxarm/os/ArchLinuxARM-aarch64-latest.tar.gz
cd && wget https://gitee.com/Ther-CN/TAI/raw/master/setupTermuxArch.sh && cd $PREFIX/bin && wget https://gitee.com/Ther-CN/TAI/raw/master/au && chmod +x au && rm au.1 && cd 
echo 正在安装，可能需要10分钟，请不要退出应用
rm Setup.sh
bash setupTermuxArch.sh
exit
fi